﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QSettings>
#include <QMainWindow>
#include <QSpinBox>

namespace Ui {
class MainWindow;
}

class DisplayWidget;
class MainWindow : public QMainWindow
{
    Q_OBJECT
    enum ZOOM{ X2 = 0, X5 = 1, X10, X20, X50, X100 };
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
    QSpinBox *m_spinBoxLine;
    DisplayWidget *m_centerWidget;
    double m_scale[8];
    ZOOM m_lens;
private:
    void setupToolBar();
    void setupAction();
    void uncheckAll();
    void initScale(QSettings &settings);
    void setupLens();
private slots:
    void lensUpdate(void);
    void test(bool);
    void loadImage();
    void saveImagewithMark();
    void saveImagewithoutMark();
    void calibrate();
    void imageEnhance(void);
    void autoMesure();
};

#endif // MAINWINDOW_H
